import request from '@/utils/request'

// 查询项目股权变更主（capTable）列表
export function listDealEquityChange(query) {
  return request({
    url: '/deal/dealEquityChange/list',
    method: 'get',
    params: query
  })
}

// 查询项目股权变更主（capTable）表单数据
export function getData(query) {
  return request({
    url: '/deal/dealEquityChange/getData',
    method: 'get',
    params: query
  })
}

// 查询项目股权变更主（capTable）详细
export function getDealEquityChange(id) {
  return request({
    url: '/deal/dealEquityChange/' + id,
    method: 'get'
  })
}

// 获取剩余投资成本
export function getSumRemainingInvestmentCosts(dealId) {
  return request({
    url: '/deal/dealEquityChange/getSumRemainingInvestmentCosts/' + dealId,
    method: 'get'
  })
}

export function getThisFirstAndLastData(date, dealId) {
  return request({
    url: '/deal/dealEquityChange/getThisFirstAndLastData/' + date + '/' + dealId,
    method: 'get'
  })
}

// 保存项目股权变更主（capTable）
export function saveDealEquityChange(data) {
  return request({
    url: '/deal/dealEquityChange/save',
    method: 'post',
    data: data
  })
}

// 删除项目股权变更主（capTable）
export function delDealEquityChange(id) {
  return request({
    url: '/deal/dealEquityChange/' + id,
    method: 'delete'
  })
}

// 导出项目股权变更主（capTable）
export function exportDealEquityChange(query) {
  return request({
    url: '/deal/dealEquityChange/export',
    method: 'get',
    params: query
  })
}
